#pragma once
#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include "epoll.hpp"
class SendRespon
{
public:
    static void OpenofOoff(int sock, bool button, Epoll* epstr)
    {
        SendRespon::_button = button;
        if(_button)
        {
            epstr->Epoll_Ctl(EPOLL_CTL_MOD, sock, EPOLLET | EPOLLIN | EPOLLOUT);
        }
        else
        {
            epstr->Epoll_Ctl(EPOLL_CTL_MOD, sock, EPOLLET | EPOLLIN);
        }
    }

private:
    static bool _button;
};
bool SendRespon::_button = false;